//
//  ListClass.hpp
//  Practice10
//
//  Created by 赵世杰 on 2020/7/25.
//  Copyright © 2020 zhaoshijie. All rights reserved.
//

#ifndef ListClass_hpp
#define ListClass_hpp

#include <stdio.h>

#endif /* ListClass_hpp */

typedef int Item;

class List
{
public:
    enum {MAX = 10};
    
    Item items[MAX];
    
    int top;
    
    List();
    
    bool add(const Item & item);
    
    bool isempty() const;
    
    bool isfull() const;
    
    void visit(void (*pf)(Item &item));
    
    void showList() const;
    
};

void db(Item &item);


